# $Id: PKGBUILD 67928 2012-03-16 10:14:46Z andrea $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Zhukov Pavel <gelios@gmail.com>

pkgname=synce-kde
pkgver=0.15
pkgrel=6
pkgdesc="Provide a means of communication with a Windows CE device - KDE tools and integration"
arch=(any)
url="http://synce.sourceforge.net/"
license=('GPL')
depends=('synce-librapi' 'synce-rra' 'setuptools' 'pygobject' 'synce-sync-engine'
         'kdebindings-python2')
optdepends=('unshield' 'orange' 'dynamite')
makedepends=('agsync' 'synce-rra')
source=("http://downloads.sourceforge.net/synce/synce-kpm-$pkgver.tar.gz")
md5sums=('12130b93710b849e18f72752a6949393')

package() {
  cd $srcdir/synce-kpm-$pkgver
  
  python2 setup.py install --root=$pkgdir --optimize=1 

  # python2 fix
  for file in $(find "${pkgdir}" -name '*.py' -print); do
    sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' $file
    sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' $file
  done
}
